home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news
- From: enno@inferenzsysteme.informatik.th-darmstadt.de (Enno Sandner)
- Newsgroups: comp.lang.c++
- Subject: Re: Derived constructors
- Date: 20 Apr 1996 10:21:46 +0200
- Organization: Fachbereich Informatik, TH Darmstadt
- Sender: enno@kitz.inferenzsysteme.informatik.th-darmstadt.de
- Message-ID: <lt7mvbmhk5.fsf@kitz.inferenzsysteme.informatik.th-darmstadt.de>
- References: <4l8g4t$4si@mn5.swip.net>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- In-reply-to: info@koncita.se's message of Fri, 19 Apr 1996 16:47:03 GMT
- X-Newsreader: Gnus v5.1
-
- In article <4l8g4t$4si@mn5.swip.net> info@koncita.se (Michael Thunberg) writes:
-
- When you derive a class, is it possible to use the parents constructor
- instead of making a new one?
-
- E.g:
-
- class CTest : public CDialog
- {
- ...
- }
-
- class CTemp : public CTest
- {
- ...
- }
-
- and then initialize CTemp using the CTest somehow....
-
- Of course -- just state the base-class in the mem-initializer list:
-
- CTemp() : CTest(<arguments>) { ... }
-
- Enno
-